package cn.nebula.core.admin.dao;

import java.util.Collection;

import cn.nebula.core.admin.model.Superuser;
import cn.nebula.core.base.dao.BaseDaoImpl;
import cn.nebula.core.base.model.ValueObject;


public class SuperuserDaoImpl extends BaseDaoImpl implements SuperuserDao {

	public Superuser login(String loginname, String loginpwd) throws Exception {
		Superuser rtn = null;
		String hql = "FROM Superuser WHERE loginno='" + loginname + "' and loginpwd='"+loginpwd+"'";
		Collection<?> datas = getHibernateTemplate().find(hql);
		if (datas!=null && !datas.isEmpty()) {
			rtn =(Superuser) datas.iterator().next();
		}
		return rtn;
	}

	public Collection<Superuser> findAll(ValueObject obj) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	public Collection<Superuser> findAllByPage(ValueObject obj, int page,
			int lines) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}


}
